﻿<%@ Page Title="Line-up" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="LineUp.aspx.cs" Inherits="WebApplication2.LineUp" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %>.</h1>
                <h2>Groep16 - Festivalinfo</h2>
            </hgroup>
            <p>
                Bekijk hier de line up van een festival</p>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="fest_id" DataSourceID="SqlDataSource1" AutoGenerateSelectButton="true" OnSelectedIndexChanging="GridView1_SelectedIndexChanging">
        <Columns>
            <asp:BoundField DataField="fest_naam" HeaderText="Festival" SortExpression="fest_naam" />
            <asp:BoundField DataField="fest_id" HeaderText="fest_id" InsertVisible="False" ReadOnly="True" SortExpression="fest_id" Visible="false" />
        </Columns>
        <SelectedRowStyle Font-Bold="true" backcolor="Azure"/>
    </asp:GridView>
    <asp:ListView ID="ListView1" runat="server" DataSourceID="SqlDataSource2" GroupItemCount="3">
        <AlternatingItemTemplate>
            <td runat="server" style="background-color:#FFF8DC;">
                <asp:Label ID="band_naamLabel" runat="server" Text='<%# Eval("band_naam") %>' Font-Bold="true" />
                <br />Podium:
                <asp:Label ID="pod_omschrLabel" runat="server" Text='<%# Eval("pod_omschr") %>' />
                <br />Datum:
                <asp:Label ID="datumLabel" runat="server" Text='<%# Eval("datum") %>' />
                <br />Uur:
                <asp:Label ID="uurLabel" runat="server" Text='<%# Eval("uur") %>' />
                <br /></td>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <td runat="server" style="background-color:#008A8C;color: #FFFFFF;">band_naam:
                <asp:TextBox ID="band_naamTextBox" runat="server" Text='<%# Bind("band_naam") %>' />
                <br />pod_omschr:
                <asp:TextBox ID="pod_omschrTextBox" runat="server" Text='<%# Bind("pod_omschr") %>' />
                <br />datum:
                <asp:TextBox ID="datumTextBox" runat="server" Text='<%# Bind("datum") %>' />
                <br />uur:
                <asp:TextBox ID="uurTextBox" runat="server" Text='<%# Bind("uur") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                <br /></td>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                <tr>
                    <td>No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <EmptyItemTemplate>
<td runat="server" />
        </EmptyItemTemplate>
        <GroupTemplate>
            <tr id="itemPlaceholderContainer" runat="server">
                <td id="itemPlaceholder" runat="server"></td>
            </tr>
        </GroupTemplate>
        <InsertItemTemplate>
            <td runat="server" style="">band_naam:
                <asp:TextBox ID="band_naamTextBox" runat="server" Text='<%# Bind("band_naam") %>' />
                <br />pod_omschr:
                <asp:TextBox ID="pod_omschrTextBox" runat="server" Text='<%# Bind("pod_omschr") %>' />
                <br />datum:
                <asp:TextBox ID="datumTextBox" runat="server" Text='<%# Bind("datum") %>' />
                <br />uur:
                <asp:TextBox ID="uurTextBox" runat="server" Text='<%# Bind("uur") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                <br /></td>
        </InsertItemTemplate>
        <ItemTemplate>
            <td runat="server" style="background-color:#DCDCDC;color: #000000;">
                <asp:Label ID="band_naamLabel" runat="server" Text='<%# Eval("band_naam") %>' Font-Bold="true" />
                <br />Podium:
                <asp:Label ID="pod_omschrLabel" runat="server" Text='<%# Eval("pod_omschr") %>' />
                <br />Datum:
                <asp:Label ID="datumLabel" runat="server" Text='<%# Eval("datum") %>' />
                <br />Uur:
                <asp:Label ID="uurLabel" runat="server" Text='<%# Eval("uur") %>' />
                <br /></td>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table id="groupPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr id="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;"></td>
                </tr>
            </table>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <td runat="server" style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">band_naam:
                <asp:Label ID="band_naamLabel" runat="server" Text='<%# Eval("band_naam") %>' />
                <br />pod_omschr:
                <asp:Label ID="pod_omschrLabel" runat="server" Text='<%# Eval("pod_omschr") %>' />
                <br />datum:
                <asp:Label ID="datumLabel" runat="server" Text='<%# Eval("datum") %>' />
                <br />uur:
                <asp:Label ID="uurLabel" runat="server" Text='<%# Eval("uur") %>' />
                <br /></td>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT bands.band_naam, podia.pod_omschr, bandsperfestival.datum, bandsperfestival.uur FROM bands INNER JOIN bandsperfestival ON bands.band_id = bandsperfestival.band_id INNER JOIN festivals ON bandsperfestival.fest_id = festivals.fest_id INNER JOIN podia ON bandsperfestival.pod_id = podia.pod_id WHERE (festivals.fest_id = @fest_id)">
        <SelectParameters>
            <asp:ControlParameter ControlID="GridView1" Name="fest_id" PropertyName="SelectedValue" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT [fest_naam], [fest_id] FROM [festivals]"></asp:SqlDataSource>
</asp:Content>